package com.zhijian.medical.util;

import lombok.Getter;
import lombok.Setter;


/**
 * token生成
 *
 * @Author chengqing
 * @DateTime 2019年4月14日 下午6:36:03
 * @Version 1.0.1
 */
@Getter
@Setter
public class TokenBean {
    //访问密钥
    private String accessKey;
    //认证密钥
    private String secretKey;
    //token版本号
    private String version = "1.0";
    //请求后缀，如：/user/submit
    private String url;
    //请求方式，GET,POST,DELETE,HEAD,PUT
    private String method;
    //url参数，如：key=v1&name=v2
    private String qryParam;
    //post参数，json
    private String bodyParam;
    //到期时间戳
//    private Long expireTime;

    public TokenBean() {
        super();
    }

    public TokenBean(String accessKey, String secretKey, String version, String url, String method, String qryParam,
                     String bodyParam) {
        super();
        this.accessKey = accessKey;
        this.secretKey = secretKey;
        this.version = version;
        this.url = url;
        this.method = method;
        this.qryParam = qryParam;
        this.bodyParam = bodyParam;
    }

    @Override
    public String toString() {
        return JsonUtil.toString(this);
    }
}
